home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / Printing / HairLines / HairLines.r < prev    next >
Encoding:
Text File  |  1992-07-15  |  3.6 KB  |  196 lines  |  [TEXT/MPS ]

  1.  
  2. /* Resources for "HairLines".      */
  3. /* 6/16/91    Dave Hersey / MacDTS  */
  4. /* ============================== */
  5.  
  6. #include "systypes.r"
  7. #include "types.r"
  8.  
  9. #define kPrefSize                128        /* Desired heapsize */
  10. #define kMinSize                 80        /* Minimum heapsize */
  11.  
  12. #define    rMenuBar                128        /* menubar            */
  13. #define    mApple                    128        /* Apple menu        */
  14. #define    mFile                    129        /* File menu        */
  15. #define    mEdit                    130        /* Edit menu         */
  16. #define    mSettings                131        /* Settings menu    */
  17.  
  18.  
  19. /* we use an MBAR resource to conveniently load all the menus */
  20.  
  21. resource 'MBAR' (rMenuBar, preload) {
  22.     { mApple, mFile, mEdit, mSettings };        /* four menus */
  23. };
  24.  
  25.  
  26. resource 'MENU' (mApple, preload) {
  27.     mApple, textMenuProc,
  28.     0b1111111111111111111111111111100,
  29.     enabled, apple,
  30.     {
  31.         "Sorry, no \"About…\" box",
  32.             noicon, nokey, nomark, plain;
  33.         "-",
  34.             noicon, nokey, nomark, plain
  35.     }
  36. };
  37.  
  38. resource 'MENU' (mFile, preload) {
  39.     mFile, textMenuProc,
  40.     0b0000000000000000000000000000101,
  41.     enabled, "File",
  42.     {
  43.         "Print Test Page…",
  44.             noicon, "P", nomark, plain;
  45.         "-",
  46.             noicon, nokey, nomark, plain;
  47.         "Quit",
  48.             noicon, "Q", nomark, plain
  49.     }
  50. };
  51.  
  52. resource 'MENU' (mEdit, preload) {
  53.     mEdit, textMenuProc,
  54.     0b0000000000000000000000000000000,
  55.     enabled, "Edit",
  56.      {
  57.         "Undo",
  58.             noicon, "Z", nomark, plain;
  59.         "-",
  60.             noicon, nokey, nomark, plain;
  61.         "Cut",
  62.             noicon, "X", nomark, plain;
  63.         "Copy",
  64.             noicon, "C", nomark, plain;
  65.         "Paste",
  66.             noicon, "V", nomark, plain;
  67.         "Clear",
  68.             noicon, nokey, nomark, plain
  69.     }
  70. };
  71.  
  72.  
  73. resource 'MENU' (mSettings, preload) {
  74.     mSettings, textMenuProc,
  75.     0b0000000000000000000000000000111,
  76.     enabled, "Settings",
  77.      {
  78.         "Use SetLineWidth (Only used with PostScript drivers)",
  79.             noicon, nokey, nomark, plain;
  80.         "Use PrGeneral",
  81.             noicon, nokey, nomark, plain;
  82.         "Scale graphics to printer dpi.",
  83.             noicon, nokey, check, plain
  84.     }
  85. };
  86.  
  87.  
  88. resource 'SIZE' (-1) {
  89.     reserved,
  90.     ignoreSuspendResumeEvents,
  91.     reserved,
  92.     cannotBackground,
  93.     multiFinderAware,
  94.     backgroundAndForeground,
  95.     dontGetFrontClicks,
  96.     ignoreChildDiedEvents,
  97.     not32BitCompatible,
  98.     notHighLevelEventAware,
  99.     onlyLocalHLEvents,
  100.     notStationeryAware,
  101.     dontUseTextEditServices,
  102.     reserved,
  103.     reserved,
  104.     reserved,
  105.     kPrefSize * 1024,
  106.     kMinSize * 1024
  107. };
  108.  
  109.  
  110. resource 'vers' (1, "Application version") {
  111.     0x1,
  112.     0x0,
  113.     release,
  114.     0x3,
  115.     verUS,
  116.     "1.03",
  117.     "1.03 by Dave Hersey,\nMacDTS, Apple Compu"
  118.     "ter, Inc."
  119. };
  120.  
  121.  
  122. resource 'vers' (2, "Application info") {
  123.     0x1,
  124.     0x0,
  125.     release,
  126.     0x3,
  127.     verUS,
  128.     "1.03",
  129.     "HairLine printing sample"
  130. };
  131.  
  132.  
  133. type 'EGAD' as 'STR ';
  134.  
  135.  
  136. resource 'EGAD' (0) {
  137.     "QuickDraw/PostScript printer HairLines Sample Application"
  138. };
  139.  
  140.  
  141. resource 'BNDL' (128) {
  142.     'EGAD',
  143.     0,
  144.     {
  145.         'ICN#',
  146.         {
  147.             0, 128
  148.         },
  149.         'FREF',
  150.         {
  151.             0, 128
  152.         }
  153.     }
  154. };
  155.  
  156.  
  157. resource 'FREF' (128) {
  158.     'APPL',
  159.     0,
  160.     ""
  161. };
  162.  
  163.  
  164. resource 'ICN#' (128) {
  165.     {    /* array: 2 elements */
  166.         /* [1] */
  167.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  168.         $"0000 1840 0000 14A0 4000 13A0 C000 0820"
  169.         $"A000 0890 9000 0808 8800 1004 8400 6002"
  170.         $"43FF 8002 20FF 00FC 20FE 0100 1078 0100"
  171.         $"1000 0E00 1000 0E00 1000 0E00 207F C600"
  172.         $"2080 2200 2100 2200 2200 2200 2200 2200"
  173.         $"2200 2200 1100 1100 0880 0880 0700 07",
  174.         /* [2] */
  175.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  176.         $"0000 1840 0000 1CE0 4000 1FE0 C000 0FE0"
  177.         $"E000 0FF0 F000 0FF8 F800 1FFC FC00 7FFE"
  178.         $"7FFF FFFE 3FFF FFFC 3FFF FF00 1FFF FF00"
  179.         $"1FFF FF00 1FFF FE00 1FFF FE00 1FFF FE00"
  180.         $"3FFF FE00 3F80 3E00 3F00 3E00 3E00 3E00"
  181.         $"3E00 3E00 3E00 3E00 1F00 1F00 0F80 0F80"
  182.         $"0700 07"
  183.     }
  184. };
  185.  
  186. resource 'ics#' (128) {
  187.     {    /* array: 2 elements */
  188.         /* [1] */
  189.         $"0000 0000 006C 807C C02E A0C3 DF8F 4F10"
  190.         $"4030 4FB0 5850 5050 5050 3838",
  191.         /* [2] */
  192.         $"0000 0000 006C 807C C03E E0FF FFFF 7FF0"
  193.         $"7FF0 7FF0 7FF0 7870 7070 7070 3838"
  194.     }
  195. };
  196.